1. Quality table as requested in scenario: Case rates by month for different regions within the EU.

summary_table1<- joined_df%>%
  group_by(sub_region, month_rep)%>%
  summarise(total_case_region= sum(total_conf_case))%>%
  mutate(monthly_cases_per_region= sum(total_case_region), 
  MPX_cases_rate_per_region =
    round( total_case_region/monthly_cases_per_region*100,1))%>%
  arrange(sub_region, desc(month_rep))
## `summarise()` has grouped output by 'sub_region'. You can override using the
## `.groups` argument.
summary_table1

The table 1 displays the distribution of Monkey Pox cases rate per month within different regions of Europe in 2022.

1.1 Quality plot or chart as requested in scenario

    summary_table1<-summary_table1 %>%
      mutate(date_months=case_when(month_rep=="May"~5,
                                   month_rep=="June"~6,
                                   month_rep=="July"~7,
                                   TRUE~8))%>% arrange(date_months)
    
summary_table1$month_rep<- factor(summary_table1$month_rep) 
    summary_table1%>%
      ggplot(aes( x=sub_region, y= MPX_cases_rate_per_region,fill=month_rep)) +
      geom_bar(position="dodge",stat="identity")+
      labs(x = "EU Regions", y = "MonkeyPox Cases Rate")+
      ggtitle("Dodged bar chart of monkeypox case rates by 
      month for different regions within the EU")

Interpretation:

The dodged bar chart describes the distribution of monkey pox cases rate by month among four regions of Europe. Among four regions of Europe, Western Europe has the most reported monkey pox cases rate during the month of July. In July monkey pox cases rate were mostly reported compared to other months. The month of May is the month where the cases of monkey pox in all regions of Europe were least reported, the Southern Europe reported more cases in May compared to other European regions.

1.2 Quality plot or chart as requested in scenario

plot_ly(
  summary_table1,
  x=~ date_months,
  y=~MPX_cases_rate_per_region,
  color=~sub_region,
  type="scatter",
  mode="lines",
  colors=c("darkorange","darkcyan","darkslateblue", "darkred")
) %>%
  layout(
    title="MonkeyPox rate in Europe within 2022 for four months( May-August)",
    yaxis=list(title="MonkeyPox Rate"),
    xaxis=list(title="Month"),
    paper_bgcolor="azure",
    plot_bgcolor="white"
  )
## Warning: `arrange_()` was deprecated in dplyr 0.7.0.
## Please use `arrange()` instead.
## See vignette('programming') for more help
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.

Interpretation:

The scatter plot depicts the relationship of monkey pox cases rate and months cases were reported. The plot shows the increasing cases from May to July with Western Europe region have the highest increase of monkey pox rates compared to other European region. Then there is a decrease of monkey pox cases rate from July to August , the Southern Europe region experienced most decrease as compared to other European regions. During the month of July , all the European regions reported more cases rate compared to other months and Western Europe region reported most cases rate during the month of July. Through out the months of reporting, Northern and Eastern Europe regions were reporting the monkey pox cases rate which is more likely the same .

female_summary<- total_dataset%>%
  mutate(mpx_rate = round(total_mpx_case/ sum(sex_female) *100,2))%>%
  select(country_code, total_mpx_case, sex_female, mpx_rate)%>%
  rename(female_population = sex_female)
female_summary

The table 2 shows the distribution of monkey pox cases rate per female population in each county.

scatter_plot <- ggplot(data = female_summary, aes(x = female_population,
                                                 y = mpx_rate)) + 
  geom_point(na.rm=TRUE) + theme_minimal(base_size = 15)+
  labs(x = " Total Number of females", 
       y = "Total number of MonkeyPox cases",
  title ="The scatter plot of MonkeyPox cases and female population
                   within European counties")
scatter_plot

Interpretation:

The scatter plot shows the relationship between monkey pox cases rate and female population. Looking at the plot there is no relationship between monkey pox cases rate and female population, that is, the patterns of the dots in the plot does not inform any relationship between the two variables. Therefore there is nonlinear relationship between female population and monkey pox cases rate in Europe.

male_summary<- total_dataset%>%
  mutate(mpx_rate = round(total_mpx_case/ sum(sex_male) *100,2))%>%
  select(country_code, total_mpx_case, sex_male, mpx_rate)%>%
  rename(male_population = sex_male)
female_summary

The table 3 shows the distribution of monkey pox cases rate per male population in each county.

scatter_plot <- ggplot(data = male_summary, aes(x = male_population,
                                                 y = mpx_rate)) + 
  geom_point(na.rm=TRUE) + theme_minimal(base_size = 15)+
  labs(x = " Total Number of males", 
       y = "Total number of MonkeyPox cases",
     title ="The scatter plot of MonkeyPox cases and male population
                   within European counties")
scatter_plot

Interpretation:

The scatter plot shows the relationship between monkey pox cases rate and male population. Looking at the plot there is no relationship between monkey pox cases rate and male population, that is, the patterns of the dots in the plot does not inform any relationship between the two variables.Therefore there is nonlinear relationship between male population and monkey pox cases rate in Europe.